package aimozg.joglfw.figures;

import aimozg.joglfw.GLColor;

import java.util.HashMap;

/**
* Created by IntelliJ IDEA.
* User: aimozg
* Date: 06.01.11
* Time: 14:11
*/
public class SimplePalette extends Palette {
	private final HashMap<String, GLColor> map = new HashMap<String, GLColor>();

	@Override
	public SimplePalette clone(){
		SimplePalette result = new SimplePalette();
		result.map.putAll(map);
		return result;
	}

	@Override
	public SimplePalette set(String name, GLColor color) {
		map.put(name, color);
		return this;
	}

	@Override
	public GLColor get(String name) {
		return map.get(name);
	}
}
